﻿@model Citi.Scheduler.WebUi.Models.ConfigurationModel
<script type="text/javascript">
    $(function () {
        $("#ConfigurationGroupId").change(function () {
            $.getJSON('@Url.Action("LoadConfigurationByGroup")', { configurationGroupId: $("#ConfigurationGroupId").val() }, function (configs) {
                var configurationDdl = $('#ConfigurationName');
                configurationDdl.empty();
                $.each(configs, function (index, config) {
                    configurationDdl.append($('<option/>', {
                        value: config.value,
                        text: config.text
                    }));
                });
            });
        });
    });
</script>
Configuration Group:
@Html.DropDownListFor(model => model.ConfigurationGroupId, (SelectList)ViewBag.ConfigurationGroups, new { style = "width:170px" })
Name:
@Html.DropDownListFor(model => model.Id, (SelectList)ViewBag.Configurations, new { id = "ConfigurationName", style = "width:170px" })
